diff --git a/setup.py b/setup.py
index dfc80578f..0c8073a71 100644
--- a/setup.py
+++ b/setup.py
@@ -21,7 +21,7 @@ install_requires = [
     'sphinxcontrib-htmlhelp',
     'sphinxcontrib-serializinghtml',
     'sphinxcontrib-qthelp',
-    'Jinja2>=2.3',
+    'Jinja2<3.1',
     'Pygments>=2.0',
     'docutils>=0.12',
     'snowballstemmer>=1.1',
diff --git a/sphinx/ext/autodoc/__init__.py b/sphinx/ext/autodoc/__init__.py
index dc413b5c2..65c4ee84c 100644
--- a/sphinx/ext/autodoc/__init__.py
+++ b/sphinx/ext/autodoc/__init__.py
@@ -679,17 +679,13 @@ class Documenter:
         def is_filtered_inherited_member(name: str, obj: Any) -> bool:
             if inspect.isclass(self.object):
                 for cls in self.object.__mro__:
-                    if cls.__name__ == self.options.inherited_members and cls != self.object:
-                        # given member is a member of specified *super class*
-                        return True
-                    elif name in cls.__dict__:
-                        return False
-                    elif name in self.get_attr(cls, '__annotations__', {}):
+                    if name in cls.__dict__:
                         return False
-                    elif isinstance(obj, ObjectMember) and obj.class_ is cls:
+                    annotations = self.get_attr(cls, '__annotations__', {})
+                    if name in annotations:
+                        # This member is an annotated member in a superclass, do not filter out
                         return False
-
-            return False
+            return True
 
         ret = []
 
diff --git a/tox.ini b/tox.ini
index 21a0faec3..be1a9127e 100644
--- a/tox.ini
+++ b/tox.ini
@@ -28,7 +28,7 @@ setenv =
     PYTHONWARNINGS = all,ignore::ImportWarning:importlib._bootstrap_external,ignore::DeprecationWarning:site,ignore::DeprecationWarning:distutils,ignore::DeprecationWarning:pip._vendor.packaging.version
     PYTEST_ADDOPTS = {env:PYTEST_ADDOPTS:} --color yes
 commands=
-    python -X dev -m pytest --durations 25 {posargs}
+    python -X dev -m pytest -rA --durations 25 {posargs}
 
 [testenv:flake8]
 basepython = python3
